package com.zb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zb.entity.ZjKnowledgeTypeInstructionBook;
import com.zb.extend.KnowledgeTypeInstructionBookExtend;
import com.zb.entity.KnowledgeTypeRelationVo;
import com.zb.vo.KnowledgeInfoVo;

import java.util.List;

/**
 * <p>
 * 知识库分类说明书表 服务类
 * </p>
 *
 * @author WEN
 * @since 2023-11-13
 */
public interface ZjKnowledgeTypeInstructionBookService extends IService<ZjKnowledgeTypeInstructionBook> {

    /**
     * 新增、删除
     * @param custAccId 商家ID
     * @param instructionBookId 说明书ID
     * @param knowledgeTypeVos 知识库关联对象
     * @param delIds 删除的知识库分类说明书ID集合
     */
    void save(Long custAccId, Long instructionBookId, List<KnowledgeTypeRelationVo> knowledgeTypeVos, List<Long> delIds);

    /**
     * 根据说明书ID获取知识库分类ID
     * @param instructionBookId
     * @return
     */
    List<ZjKnowledgeTypeInstructionBook> getByInstructionBookId(Long instructionBookId);

    /**
     * 根据说明书ID删除
     * @param instructionBookIds
     */
    void deleteBatchByInstructionBookId(List<Long> instructionBookIds);

    /**
     * 根据知识库分类ID获取关联说明书信息
     * @param knowledgeTypeIds 知识库分类ID
     * @return
     */
    List<KnowledgeTypeInstructionBookExtend> getByKnowledgeTypeIds(List<Long> knowledgeTypeIds);

    /**
     * 根据知识仓库分类ID获取说明书
     * @param knowledgeTypeId 知识仓库ID
     * @return
     */
    List<KnowledgeInfoVo> getInstructionBook(Long knowledgeTypeId);

    /**
     * 根据说明书ID获取关联说明书信息
     * @param instructionBookIds 说明书ID
     * @return
     */
    List<KnowledgeTypeInstructionBookExtend> getByInstructionBookIds(List<Long> instructionBookIds);
}
